package com.netease.framework.b;

import java.util.Hashtable;
import java.util.concurrent.PriorityBlockingQueue;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

public class c
{
  private static int j = 0;
  Thread a;
  boolean b;
  Hashtable c = new Hashtable();
  PriorityBlockingQueue d = new PriorityBlockingQueue();
  ThreadPoolExecutor e;
  e f;
  boolean g;
  f h;
  int i;

  public c()
  {
    this(5, 3);
  }

  public c(int paramInt1, int paramInt2)
  {
    this.i = paramInt1;
    this.e = new ThreadPoolExecutor(paramInt2, 30, 2000L, TimeUnit.MICROSECONDS, this.d);
  }

  /** @deprecated */
  public static int a()
  {
    monitorenter;
    try
    {
      if (j >= 32767)
        j = 0;
      int k = 1 + j;
      j = k;
      monitorexit;
      return k;
    }
    finally
    {
      localObject = finally;
      monitorexit;
    }
    throw localObject;
  }

  /** @deprecated */
  public static int a(int paramInt)
  {
    monitorenter;
    if (paramInt <= 0);
    try
    {
      int k = j;
      while (true)
      {
        return k;
        if (paramInt + j >= 32767)
          j = 0;
        k = 1 + j;
        j = paramInt + j;
      }
    }
    finally
    {
      monitorexit;
    }
    throw localObject;
  }

  public e a(Integer paramInteger)
  {
    synchronized (this.c)
    {
      e locale = (e)this.c.get(paramInteger);
      return locale;
    }
  }

  public void a(int paramInt1, int paramInt2)
  {
    Integer localInteger = new Integer(paramInt1);
    synchronized (this.c)
    {
      e locale = (e)this.c.get(localInteger);
      if (locale != null)
        locale.b(paramInt2);
      return;
    }
  }

  public void a(e parame)
  {
    if (parame != null)
    {
      parame.a(this);
      Integer localInteger = new Integer(parame.m());
      if ((parame instanceof a))
        ((a)parame).a(this.h);
      synchronized (this.c)
      {
        this.c.put(localInteger, parame);
      }
    }
    try
    {
      this.e.execute(parame);
      return;
      localObject = finally;
      monitorexit;
      throw localObject;
    }
    catch (RejectedExecutionException localRejectedExecutionException)
    {
      while (true)
      {
        localRejectedExecutionException.printStackTrace();
        if ((parame instanceof a))
        {
          ((a)parame).b(0, null);
          continue;
        }
        parame.d(0, null);
      }
    }
  }

  public void a(f paramf)
  {
    this.h = paramf;
  }

  public void b()
  {
    if (this.a != null)
    {
      this.b = true;
      this.a = null;
      this.d.clear();
      if ((this.g) && (this.f != null))
      {
        this.f.e();
        this.f = null;
      }
    }
  }

  // ERROR //
  public void b(int paramInt)
  {
    // Byte code:
    //   0: iload_1
    //   1: ifgt +4 -> 5
    //   4: return
    //   5: aload_0
    //   6: getfield 42	com/netease/framework/b/c:c	Ljava/util/Hashtable;
    //   9: astore_2
    //   10: aload_2
    //   11: monitorenter
    //   12: aload_0
    //   13: getfield 42	com/netease/framework/b/c:c	Ljava/util/Hashtable;
    //   16: invokevirtual 124	java/util/Hashtable:elements	()Ljava/util/Enumeration;
    //   19: astore 4
    //   21: aload 4
    //   23: invokeinterface 130 1 0
    //   28: ifeq +62 -> 90
    //   31: aload 4
    //   33: invokeinterface 134 1 0
    //   38: checkcast 68	com/netease/framework/b/e
    //   41: astore 5
    //   43: aload 5
    //   45: ifnull -24 -> 21
    //   48: aload 5
    //   50: invokevirtual 137	com/netease/framework/b/e:l	()I
    //   53: iload_1
    //   54: if_icmpne -33 -> 21
    //   57: aload 5
    //   59: invokevirtual 120	com/netease/framework/b/e:e	()V
    //   62: aload_0
    //   63: getfield 42	com/netease/framework/b/c:c	Ljava/util/Hashtable;
    //   66: new 70	java/lang/Integer
    //   69: dup
    //   70: aload 5
    //   72: invokevirtual 84	com/netease/framework/b/e:m	()I
    //   75: invokespecial 73	java/lang/Integer:<init>	(I)V
    //   78: invokevirtual 140	java/util/Hashtable:remove	(Ljava/lang/Object;)Ljava/lang/Object;
    //   81: pop
    //   82: goto -61 -> 21
    //   85: astore_3
    //   86: aload_2
    //   87: monitorexit
    //   88: aload_3
    //   89: athrow
    //   90: aload_2
    //   91: monitorexit
    //   92: goto -88 -> 4
    //
    // Exception table:
    //   from	to	target	type
    //   12	88	85	finally
    //   90	92	85	finally
  }

  // ERROR //
  public void b(int paramInt1, int paramInt2)
  {
    // Byte code:
    //   0: aload_0
    //   1: getfield 42	com/netease/framework/b/c:c	Ljava/util/Hashtable;
    //   4: astore_3
    //   5: aload_3
    //   6: monitorenter
    //   7: aload_0
    //   8: getfield 42	com/netease/framework/b/c:c	Ljava/util/Hashtable;
    //   11: invokevirtual 124	java/util/Hashtable:elements	()Ljava/util/Enumeration;
    //   14: astore 5
    //   16: aload 5
    //   18: invokeinterface 130 1 0
    //   23: ifeq +45 -> 68
    //   26: aload 5
    //   28: invokeinterface 134 1 0
    //   33: checkcast 68	com/netease/framework/b/e
    //   36: astore 6
    //   38: aload 6
    //   40: ifnull -24 -> 16
    //   43: aload 6
    //   45: invokevirtual 137	com/netease/framework/b/e:l	()I
    //   48: iload_1
    //   49: if_icmpne -33 -> 16
    //   52: aload 6
    //   54: iload_2
    //   55: invokevirtual 75	com/netease/framework/b/e:b	(I)V
    //   58: goto -42 -> 16
    //   61: astore 4
    //   63: aload_3
    //   64: monitorexit
    //   65: aload 4
    //   67: athrow
    //   68: aload_3
    //   69: monitorexit
    //   70: aload_0
    //   71: getfield 88	com/netease/framework/b/c:h	Lcom/netease/framework/b/f;
    //   74: ifnull +12 -> 86
    //   77: aload_0
    //   78: getfield 88	com/netease/framework/b/c:h	Lcom/netease/framework/b/f;
    //   81: iload_1
    //   82: iload_2
    //   83: invokevirtual 144	com/netease/framework/b/f:a	(II)V
    //   86: return
    //
    // Exception table:
    //   from	to	target	type
    //   7	65	61	finally
    //   68	70	61	finally
  }

  public void b(e parame)
  {
    Integer localInteger = new Integer(parame.m());
    synchronized (this.c)
    {
      ((e)this.c.remove(localInteger));
      return;
    }
  }

  public f c()
  {
    return this.h;
  }

  public void c(int paramInt)
  {
    Integer localInteger = new Integer(paramInt);
    synchronized (this.c)
    {
      e locale = (e)this.c.remove(localInteger);
      if (locale != null)
        locale.e();
      return;
    }
  }

  public void c(e parame)
  {
    if (parame != null)
    {
      parame.a(this);
      if ((parame instanceof a))
        ((a)parame).a(this.h);
      Integer localInteger = new Integer(parame.m());
      synchronized (this.c)
      {
        this.c.put(localInteger, parame);
      }
    }
  }

  // ERROR //
  public void d()
  {
    // Byte code:
    //   0: aload_0
    //   1: getfield 37	com/netease/framework/b/c:d	Ljava/util/concurrent/PriorityBlockingQueue;
    //   4: invokevirtual 114	java/util/concurrent/PriorityBlockingQueue:clear	()V
    //   7: aload_0
    //   8: getfield 42	com/netease/framework/b/c:c	Ljava/util/Hashtable;
    //   11: astore_1
    //   12: aload_1
    //   13: monitorenter
    //   14: aload_0
    //   15: getfield 42	com/netease/framework/b/c:c	Ljava/util/Hashtable;
    //   18: invokevirtual 124	java/util/Hashtable:elements	()Ljava/util/Enumeration;
    //   21: astore_3
    //   22: aload_3
    //   23: invokeinterface 130 1 0
    //   28: ifeq +32 -> 60
    //   31: aload_3
    //   32: invokeinterface 134 1 0
    //   37: checkcast 68	com/netease/framework/b/e
    //   40: astore 4
    //   42: aload 4
    //   44: ifnull -22 -> 22
    //   47: aload 4
    //   49: invokevirtual 120	com/netease/framework/b/e:e	()V
    //   52: goto -30 -> 22
    //   55: astore_2
    //   56: aload_1
    //   57: monitorexit
    //   58: aload_2
    //   59: athrow
    //   60: aload_0
    //   61: getfield 42	com/netease/framework/b/c:c	Ljava/util/Hashtable;
    //   64: invokevirtual 146	java/util/Hashtable:clear	()V
    //   67: aload_1
    //   68: monitorexit
    //   69: return
    //
    // Exception table:
    //   from	to	target	type
    //   14	58	55	finally
    //   60	69	55	finally
  }
}

/* Location:           D:\android\hack\dex2jar-0.0.9.8\classes_dex2jar.jar
 * Qualified Name:     com.netease.framework.b.c
 * JD-Core Version:    0.6.0
 */